﻿using Volo.Abp.Application.Services;
using Volo.Abp.Users;

namespace EcoSystem
{
    /// <summary>
    /// 上下文调用服务提供给Script引擎的封装类
    /// </summary>
    public class ContextScriptService : ApplicationService, IContextScriptService
    {
        public string CreateGuid()
        {
            return this.GuidGenerator.Create().ToString();
        }

        public string GetAvatar()
        {
            return null;
        }

        public string GetClientId()
        {
            return this.CurrentUser.GetClientId();
        }

        public ICurrentUser GetCurrentUser()
        {
            return this.CurrentUser;
        }

        public string GetOrganizeCode()
        {
            return this.CurrentUser.GetOrganizeCode();
        }

        public string GetOrganizeId()
        {
            return this.CurrentUser.GetOrganizeId();
        }
    }
}
